package com.car.loan.project.xr.service;

import com.car.loan.project.xr.domain.LoanStatus;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.Collection;
import java.util.List;
import java.util.Optional;

/**
 * 业务状态Service接口
 *
 * @author ruoyi
 * @date 2019-11-03
 */
public interface ILoanStatusService {

    /**
     * 查询业务状态
     *
     * @param id 业务状态ID
     * @return 业务状态
     */
    public LoanStatus selectLoanStatusById(Long id);

    Optional<LoanStatus> getByLoanId(long loanId);

    /**
     * 查询业务状态列表
     *
     * @param loanStatus 业务状态
     * @return 业务状态集合
     */
    public List<LoanStatus> selectLoanStatusList(LoanStatus loanStatus);

    /**
     * 查询分页数据
     */
    IPage<LoanStatus> selectPage(IPage<LoanStatus> page, QueryWrapper<LoanStatus> queryWrapper);

    /**
     * 新增业务状态
     *
     * @param loanStatus 业务状态
     * @return 结果
     */
    public int insertLoanStatus(LoanStatus loanStatus);

    /**
     * 修改业务状态
     *
     * @param loanStatus 业务状态
     * @return 结果
     */
    public int updateLoanStatus(LoanStatus loanStatus);

    /**
     * 批量删除业务状态
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteLoanStatusByIds(Collection<Long> ids);

    /**
     * 删除业务状态信息
     *
     * @param id 业务状态ID
     * @return 结果
     */
    public int deleteLoanStatusById(Long id);
}
